import {t} from "../i18n/index"

// 手机号校验配置
export const phoneNumRule = [
    { required: true, message: t("clueInformation_phoneNum_placeholder"), trigger: 'blur' },
    { pattern: /^(13[0-9]|14[5-9]|15[0-3,5-9]|16[2,5,6,7]|17[0-8]|18[0-9]|19[1,3,5-9])\d{8}$/, message: t("register_form_register_phoneRule2"), trigger: 'blur' }
]
export const phoneNumRuleSimple = [{ pattern: /^(13[0-9]|14[5-9]|15[0-3,5-9]|16[2,5,6,7]|17[0-8]|18[0-9]|19[1,3,5-9])\d{8}$/, message: t("register_form_register_phoneRule2"), trigger: 'blur' }]
// 手机号校验配置
export const phoneNumOrEmailRule = [
    { required: true, message: t("login_phoneoremail_required"), trigger: 'blur' },
    { pattern: /^(13[0-9]|14[5-9]|15[0-3,5-9]|16[2,5,6,7]|17[0-8]|18[0-9]|19[1,3,5-9])\d{8}$|^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/, message: t("register_form_register_phoneRule2"), trigger: 'blur' }
]
// 纳税人识别号
// [0-9A-Z]{2} 表示前两位可以是任意数字或大写字母，且必须恰好是两位
// \d{6} 表示接下来的六位必须是数字。
// [0-9A-Z]{10} 表示最后十位可以是任意数字或大写字母，且必须恰好是十位。
export const taxpayerIdRule = {
    pattern: /^[0-9A-Z]{2}\d{6}[0-9A-Z]{10}$/,
    message: t("storeManagement_taxpayerIdNumber_rule"),
    trigger: 'blur'
}